package com.tc.test.order.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.EnvironmentAware;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: tianchao
 * @Date: 2021/9/11 00:36
 * @Description:
 */
@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private Environment environment;
    @GetMapping("/test")
    public String test(){
        return "test";
    }
    @GetMapping("/detail")
    public String detail(){
        String property = environment.getProperty("server.port");
        return "order test port:" + property;
    }
}
